package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.ProviderInfoDao;
import com.gdqy.FCS.entity.ProviderInfo;

@Service
@Transactional
public class ProviderInfoService {
	
	@Autowired
	private ProviderInfoDao providerInfoDao;
	
	public int insert(ProviderInfo providerInfo){
		return providerInfoDao.insert(providerInfo);
	}
	
	public List<ProviderInfo> selectAll(){
		return providerInfoDao.selectAll();
	}
	
	public List<ProviderInfo> selectByTime(ProviderInfo providerInfo){
		return providerInfoDao.selectByTime(providerInfo);
	}
	/**
	 * 
	 *作者：张伟键
	 *方法描述：
	 * @param user_id
	 * @return
	 */
	public ProviderInfo selectByUser_id(int user_id){
		return providerInfoDao.selectByUser_id(user_id);
	}
	
	public ProviderInfo selectById(int id){
		return providerInfoDao.selectById(id);
	}
	//通过面料的成分大类获取供应商
	public List<ProviderInfo> selectByBig_code(String big_code){
		return providerInfoDao.selectByBig_code(big_code);
	}
	
	public int update(ProviderInfo providerInfo) {
		return providerInfoDao.update(providerInfo);
	}
	
	public int selectAllCount(){
		return providerInfoDao.selectAllCount();
	}
}
